import dashBoard from './components/pic/dashBoard.vue'
import bicyclicGraph from './components/pic/bicyclicGraph.vue'
import semicirclePic from './components/pic/semicirclePic.vue'
import automaticPic from './components/pic/automaticPic.vue'
import bellsWhistles from './components/pic/bellsWhistles.vue'
import movePic from './components/pic/movePic.vue'

import barRank from './components/bar/topRank.vue'
import gradedSolidBar from './components/bar/gradedSolidBar.vue'

import multicolorLine from './components/line/multicolorLine.vue'

interface ComponentTypes {
  key: number,
  label: string
}

export const componentArray = ref<{key: number, label: string}[]>([
  { key: 1, label: '仪表盘 + 刻度' },
  { key: 2, label: '双环图' },
  { key: 3, label: '会动的饼图' },
  { key: 4, label: '饼图 + 自动轮播' },
  { key: 5, label: '半圆饼图' },
  { key: 6, label: '一个花里胡哨的饼图' },
  { key: 7, label: 'top10排行' },
  { key: 8, label: '渐变立体圆柱' },
  // { key: 9, label: '多色背景范围折线图' },
  { key: 9, label: '' },
])

export const currentComponent = (item: ComponentTypes) => {
  switch (item.key) {
    case 1:
      return dashBoard;
    case 2:
      return bicyclicGraph;
    case 3:
      return movePic;
    case 4:
      return automaticPic;
    case 5:
      return semicirclePic;
    case 6:
      return bellsWhistles;
    case 7:
      return barRank;
    case 8:
      return gradedSolidBar;
    case 9:
      return multicolorLine;
    default:
      break;
  }
}

export default {}